package com.mach.platform.domain;

import com.mach.platform.domain.base.Account;
import com.mach.platform.domain.iot.IotDev;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author Administrator
 * @Description:
 * @Package: com.mach.platform.domain
 * @time 2018/7/20 0020 10:20
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "dev_follow")
public class DevFollow implements Serializable {

	private static final long serialVersionUID = -7565404961843366096L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@OneToOne
	@JoinColumn(name = "user_id")
	private Account user;

	@OneToOne
	@JoinColumn(name = "dev_id")
	private IotDev device;

}
